Platform Explorer / Nuxeo Platform 2021.7

Component org.nuxeo.ecm.core.bulk.config

Requirements

Resolution Order

796
The resolution order represents the order in which this component has been resolved by the Nuxeo Runtime framework.
You can influence this order by adding "require" tags in your component declaration, to make sure it is resolved after another component.

Contributions

XML Source

<?xml version="1.0"?>
<component name="org.nuxeo.ecm.core.bulk.config" version="1.0.0">

  <require>org.nuxeo.runtime.stream.service</require>

  <!-- ======================================================================================= -->
  <!-- Bulk Service configuration -->

  <!-- Initialize bulk service streams before action processors -->
  <extension point="logConfig" target="org.nuxeo.runtime.stream.service">
    <logConfig>
      <!-- command stream size sets the maximum concurrency for the scroller computation in the Nuxeo cluster -->
      <log name="bulk/command" size="2" />
      <!-- status stream size sets the maximum concurrency for the status computation in the Nuxeo cluster -->
      <log name="bulk/status" size="1" />
      <!-- done stream size sets the maximum concurrency for the triggers computations -->
      <log name="bulk/done" size="1" />
    </logConfig>
  </extension>

  <!-- Configure the default scroller behavior -->
  <extension target="org.nuxeo.runtime.ConfigurationService" point="configuration">
    <property name="nuxeo.core.bulk.scroller.scroll.size">200</property>
    <property name="nuxeo.core.bulk.scroller.scroll.keepAliveSeconds">60</property>
    <property name="nuxeo.core.bulk.scroller.transactionTimeout">2d</property>
    <property name="nuxeo.core.bulk.scroller.produceImmediate">false</property>
  </extension>

  <!-- Bulk service processor -->
  <extension target="org.nuxeo.runtime.stream.service" point="streamProcessor">
    <streamProcessor name="bulkServiceProcessor" class="org.nuxeo.ecm.core.bulk.BulkServiceProcessor"
      defaultCodec="avro" defaultConcurrency="1" defaultPartitions="1" defaultExternal="true" start="false">
      <stream name="bulk/command" external="false" />
      <stream name="bulk/status" external="false" />
      <stream name="bulk/done" external="false" />
      <policy name="bulk/scroller" maxRetries="0" delay="1s" maxDelay="60s"
        continueOnFailure="${nuxeo.core.bulk.scroller.continueOnFailure:=false}" />
      <policy name="bulk/status" maxRetries="20" delay="1s" maxDelay="60s"
        continueOnFailure="${nuxeo.core.bulk.status.continueOnFailure:=false}" />
      <computation name="bulk/scroller" concurrency="${nuxeo.core.bulk.scroller.concurrency:=2}" />
      <computation name="bulk/status" concurrency="${nuxeo.core.bulk.status.concurrency:=1}" />
    </streamProcessor>

    <streamProcessor name="streamIntrospection"
      class="org.nuxeo.ecm.core.bulk.introspection.StreamIntrospectionProcessor" defaultCodec="avro"
      defaultConcurrency="1" defaultPartitions="1" />

  </extension>

  <!-- ======================================================================================= -->
  <!-- Actions configuration -->

  <extension target="org.nuxeo.ecm.core.bulk" point="actions">
    <!-- Internal -->
    <action name="trash" inputStream="bulk/trash" bucketSize="100" batchSize="25" sequentialCommands="true" />
    <action name="removeProxy" inputStream="bulk/removeProxy" bucketSize="100" batchSize="25" />
    <action name="setSystemProperties" inputStream="bulk/setSystemProperties" bucketSize="100" batchSize="25" />
    <!-- Exposed through REST API -->
    <action name="setProperties" inputStream="bulk/setProperties" bucketSize="100" batchSize="25" httpEnabled="true"
      validationClass="org.nuxeo.ecm.core.bulk.validation.SetPropertiesValidation" />
  </extension>

  <!-- Action's processor -->
  <extension target="org.nuxeo.runtime.stream.service" point="streamProcessor">
    <!-- SetProperty processor -->
    <streamProcessor name="setProperties" class="org.nuxeo.ecm.core.bulk.action.SetPropertiesAction"
      defaultConcurrency="2" defaultPartitions="2">
      <policy name="default" maxRetries="3" delay="500ms" maxDelay="10s" continueOnFailure="false" />
    </streamProcessor>

    <!-- SetSystemProperty processor -->
    <streamProcessor name="setSystemProperties" class="org.nuxeo.ecm.core.bulk.action.SetSystemPropertiesAction"
      defaultConcurrency="2" defaultPartitions="2">
      <policy name="default" maxRetries="3" delay="500ms" maxDelay="10s" continueOnFailure="false" />
    </streamProcessor>

    <!-- RemoveProxy processor -->
    <streamProcessor name="removeProxy" class="org.nuxeo.ecm.core.bulk.action.RemoveProxyAction"
      defaultConcurrency="2" defaultPartitions="2">
      <policy name="default" maxRetries="3" delay="500ms" maxDelay="10s" continueOnFailure="false" />
    </streamProcessor>

    <!-- Trash processor -->
    <streamProcessor name="trash" class="org.nuxeo.ecm.core.bulk.action.TrashAction"
      defaultConcurrency="1" defaultPartitions="1">
      <policy name="default" maxRetries="3" delay="500ms" maxDelay="10s" continueOnFailure="false" />
    </streamProcessor>

  </extension>

</component>